#include "noncopyable.h"
#include "wdm.h"

namespace utils
{
    class Counter: utils::noncopyable
    {
    public:
        inline LONG Inc()
        {
            return InterlockedIncrement(&m_counter);
        }

        inline LONG Dec()
        {
            return InterlockedDecrement(&m_counter);
        }

        inline LONG GetCount() const
        {
            return m_counter;
        }

    private:
        volatile LONG m_counter;
    };
}
